<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>加入直播</title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="__CSS__/base.css">
	<link rel="stylesheet" href="__CSS__/iconfont.css">
	<link rel="stylesheet" href="__CSS__/reg.css">
	<style>
		.wrap{
			box-sizing: border-box;
			height: 100vh;
			background:none;
			background-color: #41c981;
			/*background: url("/public/static/images/bj.jpg") no-repeat;*/
			background-size: auto 120vh;
			position:  relative;
			background-image:-webkit-linear-gradient(to left, #5abd6d, #41c981);
			background-image:linear-gradient(to left, #5abd6d,#41c981);
		}
		.headtil{
			height: 60px;
			background: #3e424e;
			color: #fff;
			font-size: 20px;
			line-height: 55px;
			position: absolute;
			z-index: 111;
			width: 100%;
		}
		.uinfo{
			float: right;
			margin-right: 50px;
		}
		.ulogo{
			margin-left: 20px;
		}
		.find_password{
			top: 28%;
		}

	</style>
</head>
<body>
<div class="headtil">
	<span class="ulogo">虚拟现实技术实现平台</span>
<span class="uinfo">欢迎，{$Think.cookie.name}&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{:url('index/index/logout')}" style="color: #fff;">退出</a> </span>
</div>
<div class="wrap">
	<div class="wpn">
		<div class="form-data find_password">
			<h4>加入直播</h4>

				<p class="p-input pos">
					<label>直播ID</label>
					<input type="text" name="webcast_id" id="webcast_id" maxlength="8" >
				</p>
				<!--<p class="p-input pos">-->
					<!--<label>口令</label>-->
					<!--<input type="text" name="stoken" id="stoken">-->
				<!--</p>-->

			<button class="lang-btn next" style="background-color: #dddddb" disabled="disabled" id="join">加入</button>
			<p class="right">Powered by © 2018</p>
		</div>
	</div>
</div>
<script src="__JS__/jquery.js"></script>
<script src="__JS__/agree.js"></script>
<script src="__JS__/layui/layui.all.js"></script>
<script type="text/javascript">
	$("#webcast_id").val("");

	$("#webcast_id").keyup(function () {
        this.value=this.value.replace(/\D/g,'')
		if(this.value != ''){
            $("#join").removeAttr("disabled");
            $("#join").css('background','#41c981');
		}else{
            $("#join").css('background','#dddddb');
            $("#join").attr("disabled","disabled");
        }
    })
	
    $("#join").click(function () {
        var webcast_id = $.trim($("input[name='webcast_id']").val());
        var stoken = $.trim($("input[name='stoken']").val());
        if(webcast_id==''){layer.open({title: '提示',content: '请填写直播ID'});return}
		var name = "{$Think.cookie.name}";

		var url = "http://rykj.gensee.com/training/site/s/"+webcast_id+"?nickname="+encodeURIComponent(name)
		location.href=url
    })
</script>
</body>
</html>